import {instance} from './request'

//注册接口有问题-后端不能注册
interface UserRegister {
  email: string,
  nickName: string,
  password: string,
}
// interface UserRegister {
//   email: string,
//   nickname: string,
//   password: string | number,
//   repeatPassword: string | number
// }
export const userRegister = (options: UserRegister) => instance({ url: 'users/', method: 'post', data: options })

//登录接口可用
interface UserLogin {
  mobile: string,
  password: string 
}
export const userLogin = (data: UserLogin) => instance({ method: 'post', url: 'login/password', data })

export const userInfo=()=>instance({ method: 'get', url: 'patient/myUser'})
